<!DOCTYPE html>

<html class="no-js css-menubar" lang="zh-cn">

	<head>
		<title>管理员列表</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<!-- 移动设备 viewport -->
		<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui">
		
		<!-- 样式 -->
		<link rel="stylesheet" href="../public/themes/classic/global/css/bootstrap.css">
		<link rel="stylesheet" href="../public/fonts/font-awesome/font-awesome.css">
		<link rel="stylesheet" href="../public/fonts/web-icons/web-icons.css">
		<link rel="stylesheet" href="../public/themes/classic/base/css/site.css" id="admui-siteStyle">
		<link rel="stylesheet" href="../public/vendor/dataTables-bootstrap/dataTables.bootstrap.css">
		<link rel="stylesheet" href="../public/vendor/datatables-responsive/dataTables.responsive.css" />

		<script src="../public/vendor/jquery/jquery.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../public/vendor/vue/vue.min.js"></script>
		<script src="../public/vendor/bootstrap/bootstrap.min.js"></script>
		<!--layer弹窗-->
		<script src="../public/vendor/layer/layer.js"></script>
	</head>

	<body class="layout-full">
		<div class="page animation-fade page-blank" id="app">
			<div class="page-content">
				<div class="panel">
					<div class="panel-heading">
					</div>
					<div class="panel-body padding-top-10">
						<div class="col-xs-12">
							<form class="form-inline pull-right" id="search-form">
								<div class="form-group">
										<input class="form-control input-sm" id="username" name="username" placeholder="用户名" autocomplete="off" type="text">
								</div>
								<div class="form-group">
										<button type="button" class="btn btn-primary btn-sm" onclick="search(true)"><i class="fa fa-search" aria-hidden="true"></i> 搜索</button>
										<button type="reset" class="btn btn-primary btn-sm" >重置</button>
										
								</div>
								<div class="form-group">
										<button v-if="hasPermission('system/user/save.htm')" type="button" class="btn btn-icon btn-primary btn-sm" onclick="layer_show('添加', 'user-edit.html', '650', '500', false)">
												<i class="fa fa-plus" aria-hidden="true"></i> 添加
										</button>
										<button v-if="hasPermission('system/user/update.htm')" v-if="hasPermission('system/user/update.htm')" type="button" class="btn btn-icon btn-primary btn-sm" onclick="layer_show('编辑', 'user-edit.html', '650', '500', true)">
												<i class="fa fa-pencil" aria-hidden="true"></i> 编辑
										</button>
										<button v-if="hasPermission('system/user/delete.htm')" v-if="hasPermission('system/user/delete.htm')" type="button" class="btn btn-icon btn-primary btn-sm" onclick="layer_del('sys/user/delete')">
												<i class="fa fa-close" aria-hidden="true"></i> 删除
										</button>
								</div>
							</form>
						</div>
						<div class="col-xs-12">
							<table class="table table-bordered table-hover dataTable table-striped width-full" id="dataTable">
							    <thead>
							    <tr>
									<th></th>
							        <th>ID</th>
							        <th>用户名</th>
							        <th>邮箱</th>
							        <th>真实姓名</th>
							        <th>手机号</th>
							        <th>状态</th>
							        <th>创建时间</th>
							    </tr>
							    </thead>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	<!--搜索表单-->
	<script type="text/html" id="searchHtml">
			
	</script>
	
	<script src="../public/vendor/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="../public/vendor/dataTables/jquery.dataTables.js"></script>
	<script src="../public/vendor/dataTables/dataTables.bootstrap.js"></script>	
	<script src="../public/vendor/dataTables-responsive/dataTables.responsive.min.js"></script>
	<script src="../public/themes/classic/base/js/app.js"></script>
	<!--laydate日期-->
	<script src="../public/vendor/laydate/laydate.js"></script>
	
	
	<!--{表格必须组件}初始化表格，请放在最后引用-->
	<script src="../js/table.js"></script>
	<script>
		// 表格数据请求地址
		var ajaxUrl = baseURL + 'sys/user/list';
		// 配置表头
		 var arr = [
					{"data": "userName"},
					{"data": "email"},
					{"data": "realName"},
					{"data": "mobile"},
					{"data": null, "render": function(data, type, row) { return data.status?'<span class="label label-info">正常</span>':'<span class="label label-danger">禁用</span>'}},
					{"data": "createTime"}
				   ] 
		// 初始化表格
		TABLE.init(ajaxUrl, arr);
	</script>
		
	</body>

</html>